/*
	Copyright 2007-2010 Petr Ohlidal

	This file is a part of GrobMaker

	GrobMaker is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	GrobMaker is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with GrobMaker.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef GROBMAKER_GROBFILE_WRITER
#define GROBMAKER_GROBFILE_WRITER

/**
 * @file
 * @brief Defines a class which writes the grobfile.
 */

#include "Global.hpp"
#include <fstream>

namespace GrobMaker{

class OutputData;
class InputData;

class LuaGrobfileWriter{

	OutputData& outData;
	InputData& inData;
	std::ofstream grobfile;
	bool singlePivot;

public:
	LuaGrobfileWriter(std::string grobfilePath, OutputData& outputData, InputData& inData);
	~LuaGrobfileWriter();
	void printSprites();
	void printShades();
	void printImageAreas();
	void printPegs();
	void printHeader();
};

} // namespace GrobMaker

#endif //GROBMAKER_GROBFILE_WRITER
